#include "../include/TcpServer.hpp"

namespace wd{


TcpServer::TcpServer(unsigned short port, string ip)
:_acceptor(port,ip)
,_loop(_acceptor)
{}

void TcpServer::start(){
    _acceptor.ready();
    _loop.loop();

}

void TcpServer::stop(){
    _loop.unloop();
}

void TcpServer::setAllCallbacks(TcpConnectionCallback &&cb1, TcpConnectionCallback &&cb2, TcpConnectionCallback &&cb3){
    _loop.setAllCallbacks(cb1,cb2,cb3);
}




}
